package com.github.prontera.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ConfigUtil {

	@Value("${pay.callback.url}")
	private String payCallbackUrl;
	@Value("${pay.ali.project.public.key}")
	private String aliProjectPublicKey;
	@Value("${pay.ali.public.key}")
	private String aliPublicKey;
	@Value("${pay.ali.private.key}")
	private String aliPrivateKey;
	@Value("${pay.ali.appId}")
	private String aliAppId;
	
	@Value("${pay.weichat.appid}")
	private String weichatAppid;
	@Value("${pay.weichat.mchId}")
	private String weichatMchId;
	@Value("${pay.weichat.appkey}")
	private String weichatAppkey;
	@Value("${sms.url}")
	private String smsUrl;
	@Value("${sms.appkey}")
	private String smsAppkey;
	@Value("${sms.secret}")
	private String smsSecret;
	/**
	 * 上传文件存储的绝对路径
	 */
	@Value("${upload.absolute.file.path}")
	private String uploadAbsoluteFilePath;

	public String getAliPublicKey() {
		return aliPublicKey;
	}
	public String getAliProjectPublicKey() {
		return aliProjectPublicKey;
	}
	public String getAliAppId() {
		return aliAppId;
	}

	public String getAliPrivateKey() {
		return aliPrivateKey;
	}

	/**
	 * 访问的base路径
	 */
	@Value("${upload.access.file.path}")
	private String uploadAccessFilePath;

	/**
	 * 默认大小 50M
	 */
	@Value("${upload.file.max.size}")
	private Long uploadFileMaxSize = 1024000l;
	@Value("${download.absolute.file.path}")
	private String downloadAbsoluteFilePath;
	@Value("${qiniu.access_key}")
	private String qiNiuAccessKey;
	@Value("${qiniu.secret_key}")
	private String qiNiuSecretKey;
	@Value("${qiniu.bucketname}")
	private String qiNiuBucketname;
	@Value("${qiniu.access_url}")
	private String qiNiuAccessUrl;
	@Value("${jpush.master_secret}")
	private String jpushMasterSecret;
	@Value("${jpush.app_key}")
	private String jpushAppKey;

	public String getWeichatAppkey() {
		return weichatAppkey;
	}
	
	public String getWeichatMchId() {
		return weichatMchId;
	}
	
	 
	public String getWeichatAppid() {
		return weichatAppid;
	}
	
	 public String getPayCallbackUrl() {
		return payCallbackUrl;
	}

	public String getSmsUrl() {
		return smsUrl;
	}

	public String getSmsAppkey() {
		return smsAppkey;
	}

	public String getSmsSecret() {
		return smsSecret;
	}

	public String getQiNiuAccessUrl() {
		return qiNiuAccessUrl;
	}

	public String getQiNiuAccessKey() {
		return qiNiuAccessKey;
	}

	public String getQiNiuSecretKey() {
		return qiNiuSecretKey;
	}

	public String getQiNiuBucketname() {
		return qiNiuBucketname;
	}

	public String getDownloadAbsoluteFilePath() {
		return downloadAbsoluteFilePath;
	}

	public Long getUploadFileMaxSize() {
		return uploadFileMaxSize;
	}

	public String getUploadAbsoluteFilePath() {
		return uploadAbsoluteFilePath;
	}

	public String getUploadAccessFilePath() {
		return uploadAccessFilePath;
	}

	public String getJpushAppKey() {
		return jpushAppKey;
	}

	public String getJpushMasterSecret() {
		return jpushMasterSecret;
	}
	
}
